import winreg
import easygui
def readDocumentsPath():
    location = r"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
    # 获取注册表该位置的所有键值
    key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, location)
    keys = winreg.QueryValueEx(key, "Personal")
    winreg.CloseKey(key)
    return keys[0]

from tkinter import messagebox

from tkinter import filedialog
from tkinter import *


if __name__ == '__main__':
    print(readDocumentsPath())
    easygui.egdemo()